﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin2.master" AutoEventWireup="true" CodeFile="QuanLyDaiLy.aspx.cs" Inherits="Admin_QuanLyQuangCao" %>
<%@ Register assembly="CKEditor.NET" namespace="CKEditor.NET" tagprefix="CKEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<style type="text/css">
        .style6
    {
        height: 15px;
        width: 509px;
    }
    .style7
    {
        width: 509px;
    }
    .style8
    {
        width: 99px;
        height: 15px;
    }
    .style9
    {
        width: 99px;
    }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:FormView ID="FormView1" runat="server" BackColor="White" 
                BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                EmptyDataText="Hiện chưa có thông tin liên hệ" GridLines="Both" 
                Width="100%" Height="81px" AllowPaging="True" 
                onpageindexchanging="FormView1_PageIndexChanging">

                <EditRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                <EmptyDataRowStyle Font-Bold="True" Font-Size="Medium" />
                <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                <ItemTemplate>
                    <fieldset style="margin: 10px">
                        <legend style="color: #000000; font-size: 18px;">Thông Tin Liên Hệ</legend>
                        <table width="100%" style="margin: 10px">
                            <caption>
                                
                                <tr>
                                    <td>
                                        <asp:Label ID="Label1" runat="server" Font-Size="12px" 
                                            Text='<%# Eval("TenDaiLy") %>'></asp:Label>
                                        <br />
                                        <br />
                                    </td>
                                </tr>
                                
                                    
                                    
                                    <tr>
                                        <td>
                                            <asp:Label ID="lbLienHe" runat="server" Font-Size="12px" 
                                                Text='<%# Eval("Noidung") %>'></asp:Label>
                                            
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div style="margin-top: 20px"><asp:Image ID="Image1" runat="server" 
                                                ImageUrl='<%# "images/QC/"+Eval("Hinhanh") %>' Height="400px" 
                                                Width="500px" /></div>
                                        </td>
                                    </tr>
                               
                            </caption>
                        </table>
                    </fieldset>
                </ItemTemplate>

            </asp:FormView><br />
            <asp:HiddenField ID="hdpage" runat="server" />
            <p align="center">
                <asp:Button ID="btChinhSua" runat="server" Text="Chỉnh Sửa" Visible="False" 
                    onclick="btChinhSua_Click" Height="25px" Width="100px" />
                <asp:Button ID="btTaoMoi"
                    runat="server" Text="Tạo Mới" Visible="False" onclick="btTaoMoi_Click" 
                    Height="25px" Width="90px" />
            </p>
        </asp:View>
        <asp:View ID="View2" runat="server">
        <div style="margin-left:15px;">
            <table cellpadding="5" cellspacing="5" width="800px">
                <tr>
                    <td class="style8">
                    </td>
                    <td class="style6">
                        <asp:HiddenField ID="hdmalh" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="style9" style="font-size: 14px">
                        Tên Đại Lý :&nbsp;&nbsp;
                    </td>
                    <td class="style7">
                        <CKEditor:CKEditorControl ID="txttenqc" runat="server" Width="660px"></CKEditor:CKEditorControl>
                        <asp:Label ID="lbloiTenQC" runat="server" ForeColor="Red"></asp:Label>
                        <br />
                        <br />
                    </td>
                </tr>
                <tr>
                    <td class="style8">
                        N&#7897;i Dung:
                    </td>
                    <td class="style7">
                        <CKEditor:CKEditorControl ID="txtnoidung" runat="server" Width="660px"></CKEditor:CKEditorControl>
                        <asp:Label ID="lbloinoidung" runat="server" ForeColor="Red"></asp:Label>
                        <br />
                        <br />
                    </td>
                </tr>
                <tr>
                    <td class="style9">
                        <asp:Label ID="Label3" runat="server" Text="Hình Ảnh :" Font-Size="14px"></asp:Label>
                    </td>
                    <td class="style7">
                        <asp:FileUpload ID="txtimage" runat="server" />
                        <asp:RequiredFieldValidator ID="regularFileHinh3" runat="server" ControlToValidate="txtimage"
                            ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="regularFileHinh4" runat="server" ControlToValidate="txtimage"
                            ErrorMessage="Không phải file ảnh" ForeColor="Red" ValidationExpression="^([0-9a-zA-Z_\-~ :\\])+(.jpg|.JPG|.jpeg|.JPEG|.bmp|.BMP|.gif|.GIF|.png|.PNG)$"></asp:RegularExpressionValidator>
                        <br />
                        <asp:Label ID="lbloidungluong" runat="server" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td style="font-size: 14px" colspan="2" align="center"><br />
                        <asp:Image ID="imgHinh" runat="server" Width="200" Height="200" />
                        <asp:HiddenField ID="hdimage" runat="server" /><br /><br />
                    </td>
                </tr>
                <tr>
                    <td colspan="3" style="font-size: 14px" align="center">
                        <asp:Button ID="btthem" runat="server" Text="Thêm Mới" OnClick="btthem_Click" 
                            Width="100px" />
                        &nbsp;
                        <asp:Button ID="btcapnhat" runat="server" OnClick="btcapnhat_Click" 
                            Text="C&#7853;p Nh&#7853;t" Width="100px" />
                    </td>
                </tr>
            </table>
            </div>
            

        </asp:View>
    </asp:MultiView>
</asp:Content>

